package com.ms.service.module.fish.message.server;

import java.nio.ByteBuffer;

import com.ms.service.module.fish.game.GameConf;
import com.ms.service.module.fish.game.GameUser;
import com.ms.service.module.fish.message.FishBaseMessage;

/**
 * 使用道具掉落炮台
 * @author cuiwm
 */
public class UseBatteryMessage extends FishBaseMessage{
	
    private GameUser user;
    
    public UseBatteryMessage(GameUser user) {
    	this.user = user;
	}

	@Override
	public void writeBody(ByteBuffer buf) {
		buf.put((byte) user.getLastShell());
		buf.putInt(GameConf.getSpecialBullet(user.getLastShell()).getLimitTime());
		buf.put((byte) user.getLastShellNum());
	}


}